[cpp] Fix Nested Map & Additional Properties Support#22639
Merged
wing328 merged 7 commits intoOpenAPITools:masterfrom Jan 12, 2026
Merged
[cpp] Fix Nested Map & Additional Properties Support#22639wing328 merged 7 commits intoOpenAPITools:masterfrom
wing328 merged 7 commits intoOpenAPITools:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 23 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTinyClientCodegen.java">
<violation number="1" location="modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTinyClientCodegen.java:281">
P1: Potential NullPointerException: `ModelUtils.getAdditionalProperties(resolved)` can return null when `additionalProperties` is a boolean or not present. Consider adding a null check before calling `getTypeDeclaration(inner)`.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
...openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTinyClientCodegen.java
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
1 issue found across 7 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java">
<violation number="1" location="modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java:398">
P2: Method inserted in wrong location - this separates the existing JavaDoc for `getTypeDeclaration()` from its method. The `isPureMapSchema()` helper should be placed either before that JavaDoc block or after the `getTypeDeclaration()` method to preserve the documentation association.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
...napi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java
Show resolved
Hide resolved
Contributor
Author
|
Ready for review @muttleyxd @aminya |
aminya
reviewed
Jan 9, 2026
...openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTinyClientCodegen.java
Outdated
Show resolved
Hide resolved
aminya
suggested changes
Jan 9, 2026
...napi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java
Show resolved
Hide resolved
aminya
approved these changes
Jan 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #12737
map<string, map<string, string>>was broken.Summary by cubic
Fix nested map generation in C++ (Qt, RestSDK, Tiny) so map<string, map<string, string>> types resolve and compile. Also add additionalProperties support to cpp-restsdk models to capture and serialize unknown fields. Fixes #12737.
Bug Fixes
New Features
Written for commit d5f82ef. Summary will update on new commits.